<%-- 
    Document   : uploadmobil
    Created on : Dec 8, 2012, 2:54:07 PM
    Author     : Angga Dinata
--%>

<%@page import="java.util.LinkedList"%>
<%
    bean.DataBaseConnection conn = new bean.DataBaseConnection();
    LinkedList listMobil = null;
%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>

    <hr>
    <FORM ENCTYPE="multipart/form-data" ACTION="suksesupload.jsp" METHOD=POST>
        <br><br><br>
        <center><table border="2" >
                <tr><center><td colspan="2"><p align="center"><B>UPLOAD MOBIL</B><center></td></tr>
                        <tr><td><b>Nama mobil</b></td>
                            <td><INPUT NAME="namamobil" TYPE="text"></td></tr>
                        <tr><td><b>Harga Sewa</b></td>
                            <td><INPUT NAME="harga" TYPE="text"> /12 jam</td></tr>
                        <tr><td><b>Nama Pemilik Mobil</b></td>
                            <td><INPUT NAME="pemilik" TYPE="text"></td></tr>
                        <tr><td><b>File</b></td>
                            <td><INPUT NAME="gambar" TYPE="file"></td></tr>
                        <tr><td colspan="2"><p align="right"><INPUT TYPE="submit" VALUE="Insert" ></p></td></tr>
                        <center><h3 style="color:blue;font-family:Tahoma;font-size: 200%;outline-color: black;">HALAMAN KHUSUS ADMIN</h3></center> 
                                <table>
                                    <br>
                                    <center><h3 style="color:black;font-family:Tahoma;font-size: 130%;outline-color: black;">TABEL CUSTOMER</h3></center> 
                        <%
                                             try{
                            String query2="select * from customer";
                             java.sql.Statement statement = conn.getConnection().createStatement();
                             java.sql.ResultSet result2 = statement.executeQuery(query2);
                        %>
                        <CENTER>
                            <table style="font-family: Arial; font-size: 14px;border-color: black "width="1000" border="">
                                <tr>

                                    <th align="center"><font color="black">Nama</font></th>
                                    <th align="center"><font color="black">TTL</font></th>
                                    <th align="center"><font color="black">Alamat</font></th>
                                    <th align="center"><font color="black">No Tlp</font></th>
                                    <th align="center"><font color="black">No KTP</font></th>
                                    <th align="center"><font color="black">No SIM</font></th>
                                    <th align="center"><font color="black">Tgl Sewa</font></th>
                                    <th align="center"><font color="black">Tgl Kembali</font></th>
                                    <th align="center"><font color="black">Mobil</font></th>
                                </tr>
                                <%
                                        while (result2.next()){
                                %>
                                <tr style="font-family: Arial; font-size: 14px;color: black">

                                    <td align="center"><% out.println(result2.getString("nama")); %></td>
                                    <td align="center"><% out.println(result2.getString("ttl")); %></td>
                                    <td align="center"><% out.println(result2.getString("alamat")); %></td>
                                    <td align="center"><% out.println(result2.getString("notlp")); %></td>
                                    <td align="center"><% out.println(result2.getString("noktp")); %></td>
                                    <td align="center"><% out.println(result2.getString("nosim")); %></td>
                                    <td align="center"><% out.println(result2.getString("tglsewa")); %></td>
                                    <td align="center"><% out.println(result2.getString("tglkembali")); %></td>
                                    <td align="center"><% out.println(result2.getString("mobil")); %></td>
                                </tr>
                                <%
                                      }
                                      statement.close();
                                  } catch(Exception ex){
                                      out.println("message: "+ex.getMessage());
                                  }
                                %>
                                    </center>
                                    </FORM>
                                    <br><br>

                                    </body>
                                    </html>
